<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>安装程序 -- GreenCMS</title>

    <include file="Public:head"/>

</head>
<body class="skin-blue">

<include file="Widget:header"/>

<div class="wrapper row-offcanvas row-offcanvas-left">


<!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="__PUBLIC__/baracktocat.jpg" class="img-circle" alt="User Image"/>
            </div>
            <div class="pull-left info">

            </div>
        </div>
        <!-- search form -->
        <!--<form action="#" method="get" class="sidebar-form">-->
        <!--<div class="input-group">-->
        <!--<input type="text" name="q" class="form-control" placeholder="Search..."/>-->
        <!--<span class="input-group-btn">-->
        <!--<button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>-->
        <!--</span>-->
        <!--</div>-->
        <!--</form>-->
        <!-- /.search form -->
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu">


            <li class=""><a>使用协议书</a></li>
            <li class="active"><a>环境测试</a></li>
            <li class=""><a>网站设置</a></li>
            <li class=""><a>安装</a></li>
            <li class=""><a>安装完成</a></li>


        </ul>


    </section>
    <!-- /.sidebar -->
</aside>


<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">
<!-- Content Header (Page header) -->


<!-- Main content -->
<section class="content">

<div class="row">
<div class="col-md-12">
<div class="box box-warning">
<div class="box-header">
    <h3 class="box-title">安装</h3>
</div>
<!-- /.box-header -->
<div class="box-body">


    <div class="span12">
        <!--BEGIN TABS-->
        <div class="tabbable tabbable-custom tabbable-full-width">
            <div class="tab-content">
                <div class="tab-pane row-fluid active" id="tab_1_1">
                    <div class="span9">
                        <div class="portlet box light-grey">
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="icon-globe"></i>服务器信息
                                </div>
                            </div>
                            <div class="portlet-body">
                                <form method="post">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th class="hidden-240">参数</th>
                                            <th class="hidden-240">值</th>
                                        </tr>
                                        </thead>
                                        <tbody id="server_info">
                                        <tr>
                                            <td><strong>服务器域名</strong></td>
                                            <td>{$sp_name}</td>
                                        </tr>
                                        <tr>
                                            <td><strong>服务器操作系统</strong></td>
                                            <td>{$os_name}</td>
                                        </tr>
                                        <tr>
                                            <td><strong>服务器解译引擎</strong></td>
                                            <td>{$server_software}</td>
                                        </tr>
                                        <tr>
                                            <td><strong>PHP版本</strong></td>
                                            <td>{$php_version}</td>
                                        </tr>
                                        <tr>
                                            <td><strong>系统安装目录</strong></td>
                                            <td>{$web_root}</td>
                                        </tr>
                                        </tbody>
                                        <tfoot>
                                        <tr>
                                            <th></th>
                                            <th></th>
                                        </tr>
                                        </tfoot>
                                    </table>
                                </form>
                            </div>

                        </div>
                        <!--end span9-->
                    </div>
                    <!--end tab-pane-->
                    <div class="tab-pane row-fluid active" id="tab_1_2">
                        <div class="span9">
                            <div class="portlet box light-grey">
                                <div class="portlet-title">
                                    <div class="caption">
                                        <i class="icon-globe"></i>系统环境检测
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <form method="post">
                                        <table class="table table-striped table-bordered table-hover">
                                            <thead>
                                            <tr>
                                                <th class="hidden-240">需开启的变量或函数</th>
                                                <th class="hidden-240">要求</th>
                                                <th class="hidden-240">实际状态及建议</th>
                                            </tr>
                                            </thead>
                                            <tbody id="system_env">
                                            <tr>
                                                <td>safe_mode</td>
                                                <td align="center">Off</td>
                                                <td><?php echo $sp_safe_mode; ?>
                                                    <small>(本系统不支持在<span class="STYLE2">非win主机的安全模式</span>下运行)</small>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td>GD 支持</td>
                                                <td align="center">On</td>
                                                <td>{$sp_gd}
                                                    <small>(不支持将导致与图片相关的大多数功能无法使用或引发警告)</small>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td>MySQL 支持</td>
                                                <td align="center">On</td>
                                                <td>{$sp_mysql}
                                                    <small>(不支持无法使用本系统)</small>
                                                </td>
                                            </tr>
                                            </tbody>
                                            <tfoot>
                                            <tr>
                                                <th></th>
                                                <th></th>
                                            </tr>
                                            </tfoot>
                                        </table>
                                    </form>


                                </div>

                            </div>
                            <!--end span9-->
                        </div>
                        <!--end tab-pane-->
                        <div class="tab-pane row-fluid active" id="tab_1_3">
                            <div class="span9">
                                <div class="portlet box light-grey">
                                    <div class="portlet-title">
                                        <div class="caption">
                                            <i class="icon-globe"></i>目录权限检测
                                        </div>
                                    </div>
                                    <div class="portlet-body">
                                        <form method="post">
                                            <table class="table table-striped table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th class="hidden-240">目录名</th>
                                                    <th class="hidden-240">读取权限</th>
                                                    <th class="hidden-240">写入权限</th>
                                                </tr>
                                                </thead>
                                                <tbody id="dir_mod">
                                                <?php
																foreach($sp_testdirs as $d)
																{
															?>
                                                <tr>
                                                    <td><?php echo $d; ?></td>
                                                    <?php
 														      		$fulld = $web_root.str_replace('/*','',$d);

														      		$rsta = (is_readable($fulld) ? '<font color=green>
                                                    [√]读</font>' : '<font color=red>[×]读</font>');
                                                    $wsta = (test_write($fulld) ? '<font color=green>[√]写</font>' :
                                                    '<font color=red>[×]写</font>');
                                                    echo "
                                                    <td>$rsta</td>
                                                    <td>$wsta</td>
                                                    \r\n";
                                                    ?>
                                                </tr>
                                                <?php
																}
															?>
                                                </tbody>
                                                <tfoot>
                                                <tr>
                                                    <th></th>
                                                    <th></th>
                                                </tr>
                                                </tfoot>
                                            </table>
                                            <div class="form-actions row margin">
                                                <div class="row margin">

                                                    <button type="button" class="btn bg-red" id="step1">
                                                        <i class="m-icon-swapright m-icon-white"></i>
                                                        后退
                                                    </button>

                                                    <button type="button" class="btn btn-info" id="step3">
                                                        <i class="m-icon-swapright m-icon-white"></i>继续
                                                    </button>


                                                </div>
                                            </div>
                                        </form>
                                    </div>

                                </div>
                                <!--end span9-->
                            </div>
                            <!--end tab-pane-->
                        </div>
                    </div>
                    <!--END TABS-->
                </div>
            </div>
        </div>
        <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->


</div>
</div>
</div>
</div>


</section>
<!-- /.content -->
</aside>
<!-- /.right-side -->
</div>
<!-- ./wrapper -->

<include file="Public:foot"/>
<script>
    jQuery(document).ready(function () {
        $('#step3').click(function () {
            window.location.href = '{:U("Install/Index/step3")}';
        });
        $('#step1').click(function () {
            window.location.href = '{:U("Install/Index/step1")}';
        });
    });
</script>
</body>
</html>